package com.keepers.repair.model;

import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * auth aboom
 * date 2018/10/22
 */
public class UserModel implements Serializable {

    public String Gid;

    public String UserName;

    public String GroupGid;

    public String Name;

    public String GroupName;

    public String Phone;

    public String IsPlace;

    public String ValidityDate;

    public String IsShow;

    public String RoleName;

    public boolean Online;

    public String password;


    public boolean isValidityDate() {
        SimpleDateFormat s = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
        try {
            //否则选择的时间小于了当前的时间为true
            Date parse = s.parse(ValidityDate);
            return new Date().before(parse);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return false;
    }
}
